package com.xjzd.spring.filter;

import jakarta.servlet.*;

import java.io.IOException;

public class MyFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println(Thread.currentThread().getName() + "<>" + servletRequest + "->" + servletRequest.getLocalAddr() + ":" + servletRequest.getLocalPort() + "<-" + filterChain);
        filterChain.doFilter(servletRequest, servletResponse);
    }
}
